#!/bin/bash
echo "***dependancy to sshpass package***"

if [ $# ==  0 ]
	then
	AMIDA="amida10k"
else
	if [ $# == 1 ]
		then
		AMIDA=$1
	else
		echo -e "Usage: $0\n $0 192.133.133.2"
		exit
	fi
fi
sshpass -p amida ssh root@$AMIDA "cd /var/pkgs ;ls *.info">/tmp/amida.info
rm -rf /tmp/amida_ver.info
for i in `cat /tmp/amida.info`
	do
		echo $i|rev|sed -e "s/-/\ /g"|{ read REST VER LIB;echo -e "`echo $LIB|rev`\n`echo $VER|rev`";}>>/tmp/amida_ver.info
	done
	files=`cat /tmp/amida_ver.info | zenity --list --width=600 --height=300 --title "Packages" \
			 --column "Library Name" --column "Version" \
			 --print-column='1'`

